home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 April / EnigmA AMIGA RUN 17 (1997)(G.R. Edizioni)(IT)[!][issue 1997-04][EAR-CD].iso / EARCD / comm / bbs / F123_DEV.lha / FAME_ASM.lha / FAMEDoor_ASM / include / FAMEPublicStructs.i < prev    next >
Text File  |  1996-03-25  |  26KB  |  790 lines

  1.  
  2. ; $VER:FAMEPublicStructs.i v0.23
  3.  
  4.     IFND    FAME_FAMEPUBLICSTRUCTS_I
  5. FAME_FAMEPUBLICSTRUCTS_I    SET    1
  6.  
  7.  
  8. ; FAMEDoorMsg:
  9. ;
  10. ; Note:
  11. ;    The FAMEDoorMessage structure *must* be allocated via FAME.library
  12. ;    (Simplified example):
  13. ;
  14. ; AllocDoorMsg:
  15. ;        move.l    FAMEBase,a6
  16. ;        moveq    #AFO_FAMEDoorMsg,d0
  17. ;        jsr    _LVOFAMEAllocObject(a6)
  18. ;        move.l    d0,MyDoorMessage
  19. ;        beq    OutOfMemory
  20. ;
  21. ; FreeDoorMsg:
  22. ;        move.l    FAMEBase,a6
  23. ;        tst.l    MyDoorMessage
  24. ;        beq    DoorMessageFreed
  25. ;        move.l    MyDoorMessage,a1
  26. ;        jsr    _LVOFAMEFreeObject(a6)
  27.  
  28.  
  29. ; DoorPort Structure (FIM) Fame Interface Module Type, version 1.
  30.  
  31.  
  32.     STRUCTURE    FAMEDoorMsg,0
  33.     STRUCT    fdom_Msg,MN_SIZE    ; MessagePort Structure (System)
  34.     STRUCT    fdom_IOString,202    ; In/OutPut String
  35.     APTR    fdom_StringPtr        ; string pointer
  36.     LONG    fdom_Command        ; Command Node<->Door
  37.     LONG    fdom_Data1        ; Data 1 to transfer data
  38.     LONG    fdom_Data2        ; Data 2 to transfer data
  39.     ULONG    fdom_Data3        ; Data 3 to transfer data
  40.     LONG    fdom_ReturnCode        ; Returncode
  41.     ULONG    fdom_Node        ; NodeNumber
  42.     ULONG    fdom_InternalBits    ; FAME internal data bit flags
  43.     APTR    fdom_StructDummy1    ; APTR 1 for SystemStructs
  44.     APTR    fdom_StructDummy2    ; APTR 2 for SystemStructs
  45.     APTR    fdom_StructDummy3    ; APTR 3 for SystemStructs
  46.     APTR    fdom_StringPtr2        ; A second string pointer
  47.     ULONG    fdom_Data4        ; Data 4 to transfer data (future use)
  48.     ULONG    fdom_BitFlags        ; A bit mask to give the door infos
  49.     APTR    fdom_ExternalPort    ; External AbortIO port
  50.     LABEL    fdom_SIZEOF
  51.  
  52. ; Version(s):    0 - The old struct FAMEDoorMsg
  53. ;        1 - The latest struct FAMEDoorMsg
  54.  
  55.  
  56. ; Usage of fdom_BitFlags:
  57. ;
  58. ;byte 0:
  59. ;    bit0:    FBF_OLMSAVAIL                ; New olm(s) available
  60. ;    bit1:
  61. ;    bit2:
  62. ;    bit3:
  63. ;    bit4:
  64. ;    bit5:
  65. ;    bit6:
  66. ;    bit7:
  67. ;byte 1:
  68. ;    bit0:
  69. ;    bit1:
  70. ;    bit2:
  71. ;    bit3:
  72. ;    bit4:
  73. ;    bit5:
  74. ;    bit6:
  75. ;    bit7:
  76. ;byte 2:
  77. ;    bit0:
  78. ;    bit1:
  79. ;    bit2:
  80. ;    bit3:
  81. ;    bit4:
  82. ;    bit5:
  83. ;    bit6:
  84. ;    bit7:
  85. ;byte 3:
  86. ;    bit0:
  87. ;    bit1:
  88. ;    bit2:
  89. ;    bit3:
  90. ;    bit4:
  91. ;    bit5:
  92. ;    bit6:
  93. ;    bit7:
  94.  
  95.  
  96. ;Usage of fdom_InternalBits:
  97. ;
  98. ;byte 0:
  99. ;    bit0:    FIBF_NODOORDROP                ; Forbid the Drop Door possibility
  100. ;    bit1:
  101. ;    bit2:
  102. ;    bit3:
  103. ;    bit4:
  104. ;    bit5:
  105. ;    bit6:
  106. ;    bit7:
  107. ;byte 1:
  108. ;    bit0:
  109. ;    bit1:
  110. ;    bit2:
  111. ;    bit3:
  112. ;    bit4:
  113. ;    bit5:
  114. ;    bit6:
  115. ;    bit7:
  116. ;byte 2:
  117. ;    bit0:
  118. ;    bit1:
  119. ;    bit2:
  120. ;    bit3:
  121. ;    bit4:
  122. ;    bit5:
  123. ;    bit6:
  124. ;    bit7:
  125. ;byte 3:
  126. ;    bit0:
  127. ;    bit1:
  128. ;    bit2:
  129. ;    bit3:
  130. ;    bit4:
  131. ;    bit5:
  132. ;    bit6:
  133. ;    bit7:
  134.  
  135.  
  136. ; Definition of the ReturnCode:
  137. ;
  138. ;ReturnCode=5        Comand aborted
  139. ;ReturnCode=4        Comand not implemented untill now
  140. ;ReturnCode=3        Comand denied
  141. ;ReturnCode=2        Comand doesn't exists
  142. ;ReturnCode=1        Comand not successfull executed
  143. ;ReturnCode=0        Comand successfull executed
  144. ;ReturnCode=-1     Abort of the Door requested     -> Door must end now!
  145. ;ReturnCode=-2     Carrier lost                    -> Door must end now!
  146. ;ReturnCode=-3     Unknown error                 -> Door must end now!
  147. ;
  148. ;On negative Returncodes the Door *MUST* close *IMMEDIATELY* with the last
  149. ;command: MC_ShutDown !!!
  150. ;
  151. ;ReturnCode -1 means the SysOp or an internal procedure of FAME demands an
  152. ;abort of the Door.
  153. ;The SysOp can do this with the IconifyWindow for example. If he clicks on
  154. ;the upper left closegadget on the nodescreen this IconifyWindow appears.
  155. ;If he now clicks on "DropUser or Exit Node/Door" the Doors receives at the
  156. ;first time the ReturnCode -1 and has to call MC_ShutDown and must close down.
  157. ;If the Door doesn't note this, maybe it's a wrong Interface Module Type
  158. ;(XIM/REXX/...) and the SysOp clicks the second time on this gadget the
  159. ;Door will be kicked and the Node goes back to the Menu or previous Door.
  160. ;The same can also be done under FAME on XIM/REXXDOOR/REXXEXEC and Paragon
  161. ;Doors! (FIM/XIM/AIM/CIM/TIM)
  162.  
  163.  
  164. ; External CoProcess Message Structure, version 0.
  165.  
  166.     STRUCTURE    FAMECoProcessMsg,0
  167.     STRUCT    fcpm_Msg,MN_SIZE    ; MessagePort Structure (System)
  168.     ULONG    fcpm_Registration    ; To identify this structure
  169.     APTR    fcpm_CoProcName        ; The name of the CoProc
  170.                     ; (NewBroker like)
  171.     APTR    fcpm_CoProcTilte    ; The title of the CoProc
  172.                     ; (NewBroker like)
  173.     APTR    fcpm_CoProcDesc        ; The description of the CoProc
  174.                     ; (NewBroker like)
  175.     APTR    fcpm_CoProcAction    ; Text msg showen on Server
  176.     LONG    fcpm_Command        ; The command to the Server
  177.     LONG    fcpm_Data1        ; long based datafield 1
  178.     LONG    fcpm_Data2        ; long based datafield 2
  179.     ULONG    fcpm_Node        ; NodeNummer for CoProc usage (ident.)
  180.     LONG    fcpm_ReturnCode        ; Returncode from Server
  181.     ULONG    fcpm_CoProNum        ; CoProcessNummer
  182.     ULONG    fcpm_Data3        ; unsigned long based datafield 3
  183.     ULONG    fcpm_Data4        ; unsigned long based datafield 4
  184.     ULONG    fcpm_UnUsed
  185.     ULONG    fcpm_BitFlags        ; A bit mask for future use
  186.     ULONG    fcpm_IdentifyCode    ; To identify the CoProcess
  187.     APTR    fcpm_StringPtr        ; string pointer
  188.     APTR    fcpm_StructDummy1    ; typeless ptr for structs and more
  189.     LABEL    fcpm_SIZEOF
  190.  
  191.  
  192. ; Structure for a list of nodes for some Doorcommands and more
  193.  
  194.     STRUCTURE    FAMEDestNodes,0
  195.     APTR    fdnd_Next
  196.     ULONG    fdnd_NodeNum
  197.     LABEL    fdnd_SIZEOF
  198.  
  199.  
  200. ; FAME Info List structure for FAMESemaphore.
  201.  
  202.  
  203.     STRUCTURE    FAMEInfoList,0
  204.     APTR    fili_Next    ; Ptr. to next struct FAMEInfoList
  205.     APTR    fili_Prev    ; Ptr. to prev struct FAMEInfoList
  206.     APTR    fili_NodeRUser    ; Ptr. to Nodes read user datas
  207.     APTR    fili_NodeWUser    ; Ptr. to Nodes write user datas
  208.     APTR    fili_ConfStamm    ; Origin ptr. of the conf. list
  209.     APTR    fili_FAMECnfLst    ; Ptr. to the current conf. datas
  210.     APTR    fili_SVUserName    ; UserName (Server string)
  211.                 ; Note: Max. 22 bytes in size !
  212.     APTR    fili_SVLocation    ; UserLocation (Server string)
  213.                 ; Note: Max. 22 bytes in size !
  214.     APTR    fili_SVAction    ; Node action string (Server str)
  215.                 ; Note: Max. 22 bytes in size !
  216.     APTR    fili_VerStr    ; Node version string
  217.                 ; Note: Max. 32 bytes in size !
  218.     APTR    fili_VersionStr    ; Complete Node version string
  219.                  ; Note: Max. 62 bytes in size !
  220.     APTR    fili_ComputerType ; Computer type as string
  221.                  ; Note: Max. 36 bytes in size !
  222.     APTR    fili_ModemType    ; Modem type as string
  223.                 ; Note: Max. 36 bytes in size !
  224.     APTR    fili_Extension    ; Extension for text files
  225.                 ; Note: Max. 12 bytes in size !
  226.     APTR    fili_Language    ; Users selected language
  227.                 ; Note: Max. 32 bytes in size !
  228.     APTR    fili_ConnectMsg    ; Connect message string
  229.                 ; Note: Max. 82 bytes in size !
  230.     APTR    fili_XferProt    ; Transfer protocol name
  231.                 ; Note: Max. 32 bytes in size !
  232.     APTR    fili_FileUpload    ; Name of file uploading/ed
  233.                  ; Note: Max. 32 bytes in size !
  234.     APTR    fili_FileDownload ; Name if file downloading/ed
  235.                   ; Note: Max. 32 bytes in size !
  236.     APTR    fili_SerialDriver ; Serial device driver name
  237.                  ; Note: Max. 102 bytes in size !
  238.     APTR    fili_PubScrName    ; Node PublicScreen name
  239.                 ; Note: Max. 22 bytes in size !
  240.     APTR    fili_FiFoName    ; Node FiFo name
  241.                  ; Note: Max. 22 bytes in size !
  242.     APTR    fili_ReservedUser ; Name of reserved user
  243.                  ; Note: Max. 32 bytes in size !
  244.     APTR    fili_ASLDlPath    ; ASL requester download path
  245.                 ; Note: Max. 102 bytes in size !
  246.     APTR    fili_ASLULPath    ; ASL requester upload path
  247.                 ; Note: Max. 102 bytes in size !
  248.     APTR    fili_ASLTxtViewP; ASL requester text view path
  249.                 ; Note: Max. 102 bytes in size !
  250.     APTR    fili_WhatLogon    ; Logon type (defined)       (ptr)
  251.     APTR    fili_InitBaud    ; Baud rate on initializing  (ptr)
  252.     APTR    fili_BaudRate    ; Baud rate with no CPS      (ptr)
  253.     APTR    fili_UploadCPS    ; Upload CPS rate            (ptr)
  254.     APTR    fili_DownloadCPS; Download CPS rate          (ptr)
  255.     APTR    fili_TimeConnect; Time connected to the Node (ptr)
  256.     APTR    fili_NumConfs    ; Number of conferences      (ptr)
  257.     APTR    fili_RelativCnfs; 0 = real else relative     (ptr)
  258.     APTR    fili_ChatFlag     ; 0 = not available else available
  259.     LONG    fili_SVNodeNumber ; The number of this Node
  260.     LONG    fili_SVBaudCps     ; BaudRate or CPS (Transfer)
  261.     LONG    fili_SVActionCmd; Defined action number
  262.     LONG    fili_DataFileVer; Data file version
  263.     LONG    fili_DataFileRev; Data file revision
  264.     LONG    fili_Version    ; Nodes version
  265.     LONG    fili_Revision    ; Nodes revision
  266.     LONG    fili_StartedTime ; Nodes start time
  267.     WORD    fili_SVNodeOnline ; 0 = not started else online
  268.     WORD    fili_UserOnline     ; 0=Await, 1=Connect, 2=Valid, 3=Reset
  269.     ULONG    fili_BitFlags    ; Bit flags for different things
  270.     ULONG    fili_Reserved,20; Reserved fileds for future usage
  271.     LABEL    fili_SIZEOF
  272.  
  273. ; Note: The STRPTR sizes are including the zero-byte!
  274. ;    Most sizes are two bytes longer as the real used text string,
  275. ;    because of the zero-byte we need one byte more, but to align the
  276. ;    sizes to word size there will always calculated with one byte more.
  277. ;    This has the result that because of the zero-byte two bytes more
  278. ;    are allocated instead only one byte. FAME mostly uses not the second
  279. ;    byte, but it's ok if you fill the string completely up.
  280. ;
  281. ;    Example: fili_Extension has 12 bytes, 10 bytes max. string size
  282. ;         the 11th byte is for the zero-byte and the 12th is not used,
  283. ;         but it's not dangerous if the 12th byte is the zero-byte
  284. ;         and the other 11 are used for the string.
  285.  
  286.  
  287. ; Usage of fili_BitFlags:
  288. ;
  289. ;byte 0:
  290. ;  bit0:    FILI_USERSAVELOCK    ; Lock user data saving on logout
  291. ;  bit1:
  292. ;  bit2:
  293. ;  bit3:
  294. ;  bit4:
  295. ;  bit5:
  296. ;  bit6:
  297. ;  bit7:
  298. ;byte 1:
  299. ;  bit0:
  300. ;  bit1:
  301. ;  bit2:
  302. ;  bit3:
  303. ;  bit4:
  304. ;  bit5:
  305. ;  bit6:
  306. ;  bit7:
  307. ;byte 2:
  308. ;  bit0:
  309. ;  bit1:
  310. ;  bit2:
  311. ;  bit3:
  312. ;  bit4:
  313. ;  bit5:
  314. ;  bit6:
  315. ;  bit7:
  316. ;byte 3:
  317. ;  bit0:
  318. ;  bit1:
  319. ;  bit2:
  320. ;  bit3:
  321. ;  bit4:
  322. ;  bit5:
  323. ;  bit6:
  324. ;  bit7:
  325.  
  326.  
  327. ; Note: fili_SV kinds are equal to the Server datas used to show informations
  328. ;       on and/or about the Server.
  329. ;
  330. ; Note: This is a information structure, please do not write into the data
  331. ;       elements! This is all READ-ONLY, else you might confuse or crash
  332. ;       the system. In some cases it's possible to write into the dats,
  333. ;       but please use for strings/string pointers (here STRPTR) Forbid()
  334. ;       and Permit() around the string copy, else you can overwrite a
  335. ;       zero-byte while the node or an other tool reads the same string.
  336. ;       If you write please do not write more than the in the comment given
  337. ;       string sizes - 1 byte for the zero-byte!!!
  338. ;       Normally tools can't read/write strings at the same time as others
  339. ;       do because of the Semaphore, but door commands and MainPart can.
  340. ;       The STRPTRs are string pointers to MainPart's config data structure
  341. ;       and this structure is not in a Semaphore!
  342. ;       Because of this use also Forbid() and Permit() to read from a
  343. ;       string/string pointer (STRPTR) or read only the in the comment given
  344. ;       size limit (strncpy) and set the zero-byte on using strncpy!
  345. ;
  346. ; Note: fili_NodeRUser, fili_NodeWUser and fili_BitFlags are exceptions
  347. ;       from the next note above. fili_NodeRUser and fili_NodeWUser are
  348. ;       pointers to the both Node's user data structures of an online user.
  349. ;       They are valid as long as a node is running, also if no user is
  350. ;       online. You may ask why two structures. The first fili_NodeRUser
  351. ;       is the read data structure and the other the structure which will
  352. ;       be written back to disk if a user is loging off. MainPart reads
  353. ;       and uses all datas out of fili_NodeRUser and writes datas into both
  354. ;       structures, so if you use the pointers to change online user datas
  355. ;       please do it in the same way:
  356. ;
  357. ;       fili_NodeRUser: To read and write datas.
  358. ;       fili_NodeWUser: To write datas only.
  359. ;
  360. ;       Read example : If you want to know the username or level for
  361. ;                      validations use ONLY "fili_NodeRUser" !
  362. ;
  363. ;       Write example: If you want to change the username or level of the
  364. ;                      user use both "fili_NodeRUser" and "fili_NodeWUser" !
  365. ;
  366. ;       The reason for handling this in the above explained way is the
  367. ;       internal user edior which allows "SysOp Access" what means the
  368. ;       SysOp is able to give any online user a higher access which is
  369. ;       only available as long as the user is actual online or the Sysop
  370. ;       removes it before he is logging off.
  371. ;       To realize this fili_NodeRUser is used to save the temporär changed
  372. ;       datas on "SysOp access". fili_NodeWUser contains at this point not
  373. ;       complete equal datas to fili_NodeRUser. fili_NodeRUser won't be
  374. ;       saved on logoff, but the everytime "real" fili_NodeWUser.
  375. ;
  376. ; Note: Please read or change string contends in fili_NodeRUser and
  377. ;       fili_NodeWUser only between Forbid() and Permit() !!!
  378. ;
  379. ; Note: fili_BitFlags first bit is used with "FILI_USERSAVELOCK".
  380. ;       FILI_USERSAVELOCK is used to lock the back writings of the
  381. ;       fili_NodeWUser user datas to disk. If you need to change user datas
  382. ;       of an online user please use FILI_USERSAVELOCK to lock the
  383. ;       user data to disk back writings of the node. But only lock it
  384. ;       as short as you can, else it will disturb the node.
  385. ;       The locking is needed, because if you change he datas while a
  386. ;       user is logging off it can be that your changings will be made to
  387. ;       late and they get lost.
  388. ;       The node checks every second if it wants to write the user datas
  389. ;       to disk if the bit is clear. After 60 tries (1 minute) it will
  390. ;       clear the bit and writes the datas back to have no endless hanging
  391. ;       nodes.
  392. ;
  393. ;       Please don't lock to long!!!
  394. ;
  395. ; Note: You also need to be sure that the node is online, else
  396. ;       fili_NodeRUser and fili_NodeWUser are NULL !
  397. ;       Use fili_SVNodeOnline for this.
  398. ;
  399. ; Note: You also need to be sure that a user is online, else your changing
  400. ;       will take no effect. Use fili_SVUserOnline for this.
  401. ;
  402. ; Example for using fili_NodeRUser and fili_NodeWUser:
  403. ;
  404. ;    void ChangeDatas(struct FAMEInfoList *MyFAMEInfoList)
  405. ;    {
  406. ;      /* Pointer valid ?
  407. ;       */
  408. ;
  409. ;      if(MyFAMEInfoList) {
  410. ;
  411. ;        /* Is the Node online ?
  412. ;         */
  413. ;
  414. ;        if(MyFAMEInfoList -> fili_SVNodeOnline) {
  415. ;
  416. ;          /* Is a user online ?
  417. ;          */
  418. ;
  419. ;          if(MyFAMEInfoList -> fili_SVUserOnline == 2) {
  420. ;
  421. ;        /* Lock Node's user data savings:
  422. ;         *
  423. ;         * "|=" is in asm: "BSET"
  424. ;         */
  425. ;
  426. ;        MyFAMEInfoList -> fili_BitFlags |= FILI_USERSAVELOCK;
  427. ;
  428. ;        if(MyFAMEInfoList -> fili_NodeRUser && MyFAMEInfoList -> fili_NodeWUser) {
  429. ;
  430. ;          char        UserName[32];
  431. ;          short int    Userlevel;
  432. ;
  433. ;          /* Read datas:
  434. ;          */
  435. ;
  436. ;          Forbid();
  437. ;          strcpy(UserName,MyFAMEInfoList -> fili_NodeRUser . UserName);
  438. ;          Permit();
  439. ;
  440. ;          Userlevel = MyFAMEInfoList -> fili_NodeRUser . Userlevel;
  441. ;
  442. ;          /* Change datas:
  443. ;          */
  444. ;
  445. ;          Forbid();
  446. ;          strcpy(MyFAMEInfoList -> fili_NodeRUser . UserName,UserName);
  447. ;          strcpy(MyFAMEInfoList -> fili_NodeWUser . UserName,UserName);
  448. ;          Permit();
  449. ;
  450. ;          MyFAMEInfoList -> fili_NodeRUser . Userlevel = Userlevel;
  451. ;          MyFAMEInfoList -> fili_NodeWUser . Userlevel = Userlevel;
  452. ;
  453. ;        }
  454. ;
  455. ;        /* Unlock Node's user data savings:
  456. ;         *
  457. ;         * "&= ~" is in asm: "BCLR"
  458. ;         */
  459. ;
  460. ;        MyFAMEInfoList -> fili_BitFlags &= ~FILI_USERSAVELOCK;
  461. ;
  462. ;          }
  463. ;        }
  464. ;      }
  465. ;    }
  466. ;
  467. ;  Source Note: It is also good to use Forbid and Permit around the check
  468. ;        for a online node + user and locking with FILI_USERSAVELOCK.
  469. ;        I have left this out here to keep the source small.
  470. ;        Watch out for a complete example source also with
  471. ;        getting the semaphore i will include to the FAME
  472. ;        developer stuff.
  473. ;
  474. ;  Source Note: If you do any action like prompting for inputs or everything
  475. ;        else between readings and writings please try to unlock
  476. ;        and re-lock later. This could cause that the node writes
  477. ;        and logges of a user. That's of course a problem if you
  478. ;        want to write something back... you can do two things:
  479. ;
  480. ;        First : Check before lock and write if the user is still
  481. ;            online and lock! If the user is no longer online
  482. ;            load his account directly from the user datas and
  483. ;            change the datas and write them directly back.
  484. ;        Second:    The best way is to prompt first and after that
  485. ;            to read, change and write the datas back.
  486.  
  487.  
  488. ; FAMESemaphore with info datas for everyones usage.
  489.  
  490.     STRUCT    FAMESemaphore,0
  491.     STRUCT    fsem_Semaphore,SS_SIZE    ; The Signal Semaphore
  492.     APTR    fsem_FirstNode        ; Ptr. to first FAMEInfoList
  493.                     ; entry, in every case Node 0
  494.     APTR    fsem_SVBBSLocPath    ; BBS Location Path
  495.     APTR    fsem_SVBBSName        ; BBS Name
  496.     APTR    fsem_SVBBSOrigin    ; BBS Origin/Group
  497.     APTR    fsem_SVSysOpName    ; SysOp Name
  498.     LONG    fsem_SVNumOfNodes    ; The number of nodes in list
  499.     LONG    fsem_SVVersion        ; Servers version
  500.     LONG    fsem_SVRevision        ; Servers revision
  501.     LONG    fsem_SVStartedTime    ; Servers start time
  502.     ULONG    fsem_Reserved,20    ; Reserved fileds for future
  503.     LABEL    fsem_SIZEOF
  504.  
  505. ; Note: fsem_SV kinds are equal to the Server datas used to show informations
  506. ;    on and/or about the Server.
  507.  
  508.  
  509. ; External editor structure, version 1.
  510.  
  511.     STRUCTURE    FAMEExternEditor,0
  512.     APTR    feed_EdMailHeader    ; Pointer to filled structure
  513.     APTR    feed_MsgListStamm    ; Replylist
  514.     APTR    feed_FilePath        ; MsgBasePath
  515.     LONG    feed_MsgType        ; 0 External file, 1 Enter new
  516.                     ; Msg, 2 Reply Msg, 3 Part Msg,
  517.                     ; 4 OLM, 5 Edit Msg, 6 Script Mode
  518.     LONG    feed_Data        ; Dummy Max lines on MsgType=4
  519.     LONG    feed_StartLine        ; StartLine, if 0 then no reply lines !
  520.     LONG    feed_EndLine        ; EndLine, if 0 then no reply lines !
  521.     LABEL    feed_SIZEOF
  522.  
  523.  
  524. ; Messagebase mail header structure, version 0.
  525.  
  526.     STRUCTURE    FAMEMailHeader,0
  527.     STRUCT    fmah_ToName,32        ; To user name    Name/ALL/EALL/UEALL
  528.     STRUCT    fmah_FromName,32    ; From user name
  529.     STRUCT    fmah_Subject,32        ; Subject
  530.     STRUCT    fmah_ToNet,12        ; From Net
  531.     STRUCT    fmah_FromNet,12        ; To Net
  532.     STRUCT    fmah_CryptPW,12        ; KryptPW
  533.     STRUCT    fmah_StrNotUsed1,12
  534.     STRUCT    fmah_StrNotUsed2,12
  535.     STRUCT    fmah_StrNotUsed3,12
  536.     LONG    fmah_MsgNum        ; Message number
  537.     LONG    fmah_MsgDate        ; Message date
  538.     LONG    fmah_Crypt        ; Crypted Y/N 0=no
  539.     LONG    fmah_UFromLevel        ; Level from writer
  540.     LONG    fmah_Lines        ; Number of lines for read testing
  541.                     ; if more than 100 lines...
  542.     LONG    fmah_AktMsgNum        ; Needed for SYSCMD: MAILHEADER
  543.     LONG    fmah_LongNotUsed2
  544.     LONG    fmah_Prioity        ; Priority
  545.     LONG    fmah_DeleteInDays    ; Delete in days
  546.     LONG    fmah_Recived        ; Times read
  547.     ULONG    fmah_ULongNotUsed1
  548.     ULONG    fmah_ULongNotUsed2
  549.     ULONG    fmah_ULongNotUsed3
  550.     ULONG    fmah_ULongNotUsed4
  551.     WORD    fmah_MsgStatus        ; State: deleted? 1=valid 0=deleted
  552.     WORD    fmah_AFileStat        ; Attached file(s)?
  553.     WORD    fmah_NotUsed
  554.     WORD    fmah_Private        ; Private msg?
  555.     WORD    fmah_ToNameRec        ; Received by fmah_ToName?
  556.     WORD    fmah_HeadNumLines    ; Number of lines skipping
  557.                     ; because of header
  558.     WORD    fmah_ShortNotUsed2
  559.     WORD    fmah_ShortNotUsed3
  560.     WORD    fmah_ShortNotUsed4
  561.     WORD    fmah_ShortNotUsed5
  562.     LABEL    fmah_SIZEOF
  563.  
  564.  
  565. ; Messagebase mail status structure, version 0.
  566.  
  567.     STRUCTURE    FAMEMailStat,0
  568.     LONG    fmas_HighMsgNum
  569.     LABEL    fmas_SIZEOF
  570.  
  571.  
  572. ; CoProcess structure. This one is needed to tell the Server of your
  573. ; CoProcess requests.
  574.  
  575.     STRUCTURE    FAMECoProcess,0
  576.     STRUCT    fcop_CoPrStartPath,32    ; (Path)/Name for the CoProcess
  577.     STRUCT    fcop_CoPrArgs,32    ; Args for CoProcess
  578.     LONG    fcop_StartDate1        ; Start at 1. Date
  579.     LONG    fcop_StartDate2        ; Start at 2. Date
  580.     LONG    fcop_StartDate3        ; Start at 3. Date
  581.     LONG    fcop_StartDate4        ; Start at 4. Date
  582.     LONG    fcop_StartDate5        ; Start at 5. Date
  583.     LONG    fcop_StartDate6        ; Start at 6. Date
  584.     LONG    fcop_StartDate7        ; Start at 7. Date
  585.     LONG    fcop_StartDate8        ; Start at 8. Date
  586.     LONG    fcop_StartDate9        ; Start at 9. Date
  587.     LONG    fcop_StartDate10    ; Start at 10. Date
  588.     ULONG    fcop_Flag1        ; Flags 1
  589.     ULONG    fcop_Reserved        ; Reserved!
  590.     LABEL    fcop_SIZEOF
  591.  
  592. ;Usage of Flag1:             (Flag1 is unused!)
  593. ;
  594. ;byte 0:
  595. ;    bit0:     ; Activated y/n
  596. ;    bit1:
  597. ;    bit2:
  598. ;    bit3:
  599. ;    bit4:
  600. ;    bit5:
  601. ;    bit6:
  602. ;    bit7:
  603. ;byte 1:
  604. ;    bit0:
  605. ;    bit1:
  606. ;    bit2:
  607. ;    bit3:
  608. ;    bit4:
  609. ;    bit5:
  610. ;    bit6:
  611. ;    bit7:
  612. ;byte 2:
  613. ;    bit0:
  614. ;    bit1:
  615. ;    bit2:
  616. ;    bit3:
  617. ;    bit4:
  618. ;    bit5:
  619. ;    bit6:
  620. ;    bit7:
  621. ;byte 3:
  622. ;    bit0:
  623. ;    bit1:
  624. ;    bit2:
  625. ;    bit3:
  626. ;    bit4:
  627. ;    bit5:
  628. ;    bit6:
  629. ;    bit7:
  630.  
  631.  
  632. ; ToolPort message structure to let the Server receive requests from tools,
  633. ; version 0.
  634.  
  635.     STRUCTURE    FAMEToolPortMsg,0
  636.     STRUCT    ftpm_Msg,MN_SIZE    ; MessagePort Structure (System)
  637.     ULONG    ftpm_Registration    ; To identify this structure
  638.     APTR    ftpm_ToolName        ; The name of the Tool
  639.                     ; (NewBroker like)
  640.     APTR    ftpm_ToolTilte        ; The title of the Tool
  641.                     ; (NewBroker like)
  642.     APTR    ftpm_ToolDesc        ; The description of the Tool
  643.                     ; (NewBroker like)
  644.     APTR    ftpm_ToolAction        ; Text msg showen on Server
  645.     LONG    ftpm_Command        ; The command to the Server Tool Port
  646.     LONG    ftpm_Data1        ; long based datafield 1
  647.     LONG    ftpm_Data2        ; long based datafield 2
  648.     LONG    ftpm_ReturnCode        ; Returncode from Server
  649.     ULONG    ftpm_Node        ; NodeNummer for Tool usage (identify)
  650.     ULONG    ftpm_Data3        ; unsigned long based datafield 3
  651.     ULONG    ftpm_Data4        ; unsigned long based datafield 4
  652.     ULONG    ftpm_UnUsed
  653.     ULONG    ftpm_BitFlags        ; A bit mask for future use
  654.     ULONG    ftpm_BitRequests1    ; A bit mask for requests 1
  655.     ULONG    ftpm_BitRequests2    ; A bit mask for requests 2
  656.     ULONG    ftpm_BitRequests3    ; A bit mask for requests 3
  657.     ULONG    ftpm_BitRequests4    ; A bit mask for requests 4
  658.     ULONG    ftpm_IdentifyCode    ; To identify the Tool
  659.     APTR    ftpm_StringPtr1        ; string pointer 1
  660.     APTR    ftpm_StringPtr2        ; string pointer 2
  661.     APTR    ftpm_StructDummy1    ; typeless ptr for structs and more 1
  662.     APTR    ftpm_StructDummy2    ; typeless ptr for structs and more 2
  663.     LABEL    ftpm_SIZEOF
  664.  
  665. ; Returncodes:
  666. ;                 8 You have to use ftpm_Register first
  667. ;                 7 ftpm_IdentifyCode not valid
  668. ;                 6 ftpm_ToolName not given
  669. ;                 5 Comand aborted
  670. ;                 4 Comand not implemented untill now
  671. ;                 3 Comand denied
  672. ;                 2 Comand doesn't exists
  673. ;                 1 Comand not successfull executed
  674. ;                 0 Comand successfull executed
  675. ;                -1 Fatal error. Remove your tool immediately
  676. ;                -2 You are not the Tool you are trying to be
  677. ;                -3 Unknown error
  678.  
  679. ; General words for the usage of the ToolPort.
  680. ;
  681. ; First every new Tool must register before it can do anything.
  682. ; To register the fields ftpm_ToolName, ftpm_ToolTilte and ftpm_ToolDesc
  683. ; have to be filled (point to strings defined in your tool space).
  684. ; ftpm_ToolName is a *must*, without no entry is allowed. If ftpm_ToolTilte
  685. ; and ftpm_ToolDesc are not set the Server will point them to ftpm_ToolName.
  686. ; Now you have to set the ftpm_Command to ftpm_Register (define = 0), later
  687. ; if you no longer need the ToolPort you have to use ftpm_EndRegister define.
  688. ; You also have to fill ftpm_Node if your Tool may run multiple at one time
  689. ; if you fill it out you will get this number back over the ToolNotifyPort
  690. ; you have to apply. You have always to allocate the structure via
  691. ; AllocFAMEObject from FAME.library. Now you can send this message to the
  692. ; Server and if everything went ok you will get in ftpm_IdentifyCode
  693. ; your code for identifying which you *must* use from now on everytime
  694. ; you send any request over this ToolPort to the Server. The Server
  695. ; will also give this code to you if you receive a message over your
  696. ; ToolNotifyPort. Also if you use ftpm_EndRegister to end your tool
  697. ; you have to set ftpm_IdentifyCode to your received code, but the best is
  698. ; to let the field ftpm_IdentifyCode like it is.
  699. ;
  700. ; Note: Be sure that all the time you use the ToolPort you *must* leave
  701. ;         ftpm_ToolName and ftpm_IdentifyCode untouched!!!
  702. ;
  703. ; ftpm_ToolName is the simple name of the tool, no version, no coder name
  704. ; and no other stuff here! Add only the Node number or your process
  705. ; adress or something similar if your tool can be started multiple.
  706. ;     (max. 40 chars long, try to use only 20 chars, because of displaying)
  707. ; ftpm_ToolTilte is the title like tool name, version and coder name.
  708. ;     (max. 40 chars long, try to use only 20 chars, because of displaying)
  709. ; ftpm_ToolDesc is the description fo the tool, means what it does.
  710. ;     (max. 40 chars long, try to use only 20 chars, because of displaying)
  711. ; ftpm_ToolAction is the actual action/state of the tool similar
  712. ; to Servers Action field on display.
  713. ;     (max. 40 chars long, try to use only 20 chars, because of displaying)
  714.  
  715.  
  716. FAMETP_Register        EQU    0
  717. FAMETP_EndRegister    EQU    1
  718. FAMETP_InfoStructs    EQU    2
  719.  
  720.  
  721. ; Tool notify message structure to tell the tools using ToolPort of actions
  722.  
  723.     STRUCTURE    FAMEToolNotifyMsg,0
  724.     STRUCT    ftnm_Msg,MN_SIZE    ; MessagePort Structure (System)
  725.     LONG    ftnm_Notify        ; The notify define
  726.     LONG    ftnm_Data1        ; long based datafield 1
  727.     LONG    ftnm_ReturnCode        ; Returncode from Tool
  728.     ULONG    ftnm_Node        ; NodeNummer for Tool usage (identify)
  729.     ULONG    ftnm_Data2        ; unsigned long based datafield 2
  730.     ULONG    ftnm_UnUsed
  731.     ULONG    ftnm_BitFlags        ; A bit mask for future use
  732.     ULONG    ftnm_BitRequests1    ; A bit mask for requests 1
  733.     ULONG    ftnm_BitRequests2    ; A bit mask for requests 2
  734.     ULONG    ftnm_BitRequests3    ; A bit mask for requests 3
  735.     ULONG    ftnm_BitRequests4    ; A bit mask for requests 4
  736.     ULONG    ftnm_IdentifyCode    ; To identify the Tool
  737.     APTR    ftnm_StringPtr        ; string pointer
  738.     APTR    ftnm_StructDummy1    ; typeless ptr for structs and more
  739.     LABEL    ftnm_SIZEOF
  740.  
  741. ; Returncodes you can set for the Server:
  742. ; 0 Everything ok, delete request
  743. ; 1 Everything ok, hold request
  744.  
  745.  
  746. ; OLM structure of dynamic allocated list entries to be as result the
  747. ; complete OLM text.
  748. ;
  749. ; Note: You must free fols_OLMessage with FreeVec first before you
  750. ;         free any list entry!!!
  751. ;
  752. ; Why a dynamic allocation? Because after the guide lines noone should
  753. ; send more than 1kb and ideally no more than 256 characters per write
  754. ; to the console. So you can have more shorter strings. MainPart needs
  755. ; this also because of lists from editors used to write olms.
  756.  
  757.     STRUCTURE    FAMEOLMString,0
  758.     APTR    fols_Next    ; Pointer to the Next list entry
  759.     APTR    fols_Prev    ; Pointer to the Prev list entry
  760.     APTR    fols_OLMessage    ; OLM message text. Note, it has
  761.                 ; been dynamic allocated via
  762.                 ; AllocVec and so you have to
  763.                 ; deallocate it via FreeVec
  764.                 ; before you begin to free one
  765.                 ; of the list entries!!!
  766.     LABEL    fols_SIZEOF
  767.  
  768.  
  769. ; OLM structure to send online messages.
  770. ;
  771. ; Note: You must free the list beginning with folm_First first completely
  772. ;         before you free any list entry!!!
  773. ;         Note also the note for the structure FAMEOLMString!!!
  774.  
  775.     STRUCTURE    FAMEOnlineMsg,0
  776.     APTR    folm_Next        ; Pointer to the Next list entry
  777.     APTR    folm_Prev        ; Pointer to the Prev list entry
  778.     APTR    folm_FirstOLMStr    ; The first entry of the dynamic
  779.                     ; allocated OLM text list
  780.     STRUCT    folm_Sender,32        ; The name of the user/tool
  781.                     ; who/which has send this olm
  782.     STRUCT    folm_Command,202    ; Maybe a menu command, FAMEChat
  783.     ULONG    folm_NodeNr        ; The node number of the sender
  784.     ULONG    folm_BitFlags        ; Bit flags for different things
  785.     LONG    folm_Time        ; The time the olm was sent
  786.     LONG    folm_Date        ; The date the olm was sent
  787.     LABEL    folm_SIZEOF
  788.  
  789.    ENDC * FAME_FAMEPUBLICSTRUCTS_I
  790.